package com.zjc.yohoshop.mvp.view.fragment;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.zjc.lib_core.base.BaseFragment;
import com.zjc.yohoshop.R;
import com.zjc.yohoshop.bean.CategoryEntity;
import com.zjc.yohoshop.bean.CategotyHotEntity;
import com.zjc.yohoshop.di.compont.DaggerCategoryFragmentCompont;
import com.zjc.yohoshop.di.modules.CategoryFragmentMudules;
import com.zjc.yohoshop.mvp.contract.CategoryFragmentContract;
import com.zjc.yohoshop.mvp.persenter.CategoryFragmentPresenter;

/**
 * A simple {@link Fragment} subclass.
 */
public class CategoryFragment extends BaseFragment<CategoryFragmentPresenter> implements CategoryFragmentContract.CategoryFragmentIView {
    private View view;

    @Override
    public View createView(LayoutInflater inflater) {
        view = inflater.inflate(R.layout.fragment_category, null);
        return view;
    }

    @Override
    public void init(View view) {

    }

    @Override
    public void initData() {
        p.requestAll();
    }

    @Override
    public void setupDagger() {
        DaggerCategoryFragmentCompont.builder()
                .categoryFragmentMudules(new CategoryFragmentMudules(this))
                .build().inject(this);
    }

    @Override
    public void categoryLeftSuccess(CategoryEntity entity) {
        Log.d("6666", entity.getValues().toString());
    }

    @Override
    public void categoryRightSuccess(CategotyHotEntity entity) {

    }

    @Override
    public void showDialog() {

    }


    @Override
    public void hideDialog() {

    }


//    public CategoryFragment() {
//        // Required empty public constructor
//    }
//
//
//    @Override
//    public View onCreateView(LayoutInflater inflater, ViewGroup container,
//                             Bundle savedInstanceState) {
//        // Inflate the layout for this fragment
//        return inflater.inflate(R.layout.fragment_category, container, false);
//    }

}
